import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    /*  {
      path: '/',
      name: 'index',
      component: () => import('@/views/index/index')
    }, */
    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/login/index')
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('@/views/login/register')
    },
    {
      path: '/forget',
      name: 'forget',
      component: () => import('@/views/login/forget')
    },
    {
      path: '/',
      name: 'store',
      component: () => import('@/views/store/index'),
      meta: {
        isLogin: true // 需要加校检判断的路由
      }
    },
    {
      path: '/store',
      name: 'store',
      component: () => import('@/views/store/index'),
      meta: {
        isLogin: true // 需要加校检判断的路由
      }
    },
    {
      path: '/storeDetail',
      name: 'storeDetail',
      component: () => import('@/views/store/detail'),
      meta: {
        isLogin: true // 需要加校检判断的路由
      }
    },
    {
      path: '/storeAddr',
      name: 'storeAddr',
      component: () => import('@/views/store/address'),
      meta: {
        isLogin: true // 需要加校检判断的路由
      }
    },
    {
      path: '/addAddress',
      name: 'addAddress',
      component: () => import('@/views/store/addAddress'),
      meta: {
        isLogin: true // 需要加校检判断的路由
      }
    },
    {
      path: '/editAddress',
      name: 'editAddress',
      component: () => import('@/views/store/editAddress'),
      meta: {
        isLogin: true // 需要加校检判断的路由
      }
    },
    {
      path: '/storeOrder',
      name: 'storeOrder',
      component: () => import('@/views/store/order'),
      meta: {
        isLogin: true // 需要加校检判断的路由
      }
    }
  ]
})
